@color-font-primary: rgba(0, 0, 0, 0.65);

.el-input {

  .el-input-group__prepend,
  .el-input-group__append {
    background: #fafafa;
    color: #999;
    padding: 0 10px;
    border-color: #e5e5e5;

    .el-select {
      width: 170px;
      margin: -1px -10px;
    }
  }

  .el-input-group__prepend {
    .el-select {
      width: 124px;
      margin: -1px -10px;
      background: @color-primary;
      color: #fff;

      .el-input__inner {
        border-color: transparent !important;
        text-align: center;
        padding-left: 0;
        padding-right: 36px;
      }

      .el-input__suffix {
        padding: 0 7px 0 10px;
        border-left: 1px solid rgba(255, 255, 255, 0.5);
        top: 9px;
        bottom: 9px;
        height: auto;

        .el-select__caret {
          display: flex;
          align-items: center;

          &:before {
            content: '\e65b' !important;
            color: #fff;
          }
        }
      }
    }
  }

  &>input {
    border-radius: 2px;
    border-color: #e5e5e5;
    color: #333;

    &:hover {
      border-color: @color-primary;
    }

    &:active,
    &:focus {
      outline: 0;
      box-shadow: 0 0 0 1px rgba(45, 227, 240, 0.2);
    }
  }

  &[disabled],
  &.is-disabled {
    .el-input__inner {
      background: #f2f2f2 !important;
    }
    
    .el-input-group__prepend {
      background: #e5e5e5 !important;
    }
  }

  // 处理圆角
  &.is-round {
    .el-input-group__prepend {
      border-top-left-radius: 17px;
      border-bottom-left-radius: 17px;
    }

    .el-input-group__append {
      border-top-right-radius: 17px;
      border-bottom-right-radius: 17px;
    }

    &>input:not(:first-child) {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }

    &>input:not(:last-child) {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
  }

  &>input[round],
  &.is-round>input {
    border-radius: 17px;
  }

  .el-input-group__prepend {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;

    &+input[round] {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }
  }

  .el-input-group__append {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
  }

  &>input[round]:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
}

.el-input--medium .el-input__inner {
  height: 32px;
  line-height: 32px;
}

.el-input--small .el-input__inner {
  height: 24px;
  line-height: 24px;
}

// 时间组件样式safari兼容
.el-range-editor .el-range-input {
  line-height: 2;
}

.db-prefix-primary-input {
  .el-input__prefix {
    .iconfont-handle {
      line-height: 32px;
      margin-left: 6px;
      color: @color-primary;
    }
  }
}

// 带字符长度提示的input
.input-with-tips {
  position: relative;

  .el-input__inner {
    padding-right: 70px;
  }

  &-length {
    position: absolute;
    right: 14px;
    top: 0;
    height: 36px;
    line-height: 36px;
    color: #ccc;
    font-size: 14px;
  }
}

.el-input-number.is-controls-right .el-input-number__decrease {
  bottom: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 21px;
  height: 15px;
  box-sizing: border-box;
}

.el-input-number.is-controls-right .el-input-number__increase {
  top: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 21px;
  height: 15px;
  box-sizing: border-box;
}
